package com.newlink.building.userinfo.mvp.model

import com.newlink.building.common_base.base.BaseModel
import com.newlink.building.common_base.http.Base_RetrofitHelper
import com.newlink.building.common_base.model.bean.HttpResult
import com.newlink.building.common_base.model.bean.MessageReadRequest
import com.newlink.building.common_base.model.bean.ResponseTopData
import com.newlink.building.userinfo.mvp.contract.Module_UserInfo_MessageCenterDetailContract
import io.reactivex.Observable

/**
 * @author wangyang
 * @date 2022/4/11
 * @description 我的——消息中心——消息详情页面的Model
 */
class Module_UserInfo_MessageCenterDetailModel : BaseModel(), Module_UserInfo_MessageCenterDetailContract.Model {

    override fun setMessageReadStatus(request: MessageReadRequest): Observable<HttpResult<ResponseTopData>> {
        return Base_RetrofitHelper.service.setMessageReadStatus(
            request.accessToken,
            mutableListOf(request.data.id.toLong())
        )
    }
}